package com.zsck.pos.net;


import com.zsck.net.Utils.BaseResponse;
import com.zsck.pos.bean.Bill;
import com.zsck.pos.bean.Bills;
import com.zsck.pos.bean.LoginResult;
import com.zsck.pos.bean.MultiBills;
import com.zsck.pos.bean.PayData;
import com.zsck.pos.bean.PaySuccess;
import com.zsck.pos.bean.Project;
import com.zsck.pos.bean.Record;
import com.zsck.pos.bean.Records;
import com.zsck.pos.bean.UncheckBill;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

public interface ApiService {


    /**
     * 登录
     * @param info
     * @return
     */
    @POST("common-service/app/login/UISLogin")
    Observable<BaseResponse<LoginResult>> login(@Body Map<String, String> info);
    /*
    登录加密
    * */
    @POST("common-service/app/login/UISLoginH5")
    Observable<BaseResponse<LoginResult>> loginH5(@Body Map<String, String> info);

    /**
     * 支付回调接口
     * @param info
     * @return
     */
    @POST("finance-service/pos/myBill/posPayCallback")
    Observable<BaseResponse<PaySuccess>> posPayCallback(@Body Map<String, Object> info);

    /**
     * 获取账单列表
     * @param info
     * @return
     */
    @POST("finance-service/pos/myBill/getPageBillList")
    Observable<BaseResponse<Bills>> getPageBillList(@Body Map<String, Object> info);


    /**
     *  账单详情
     * @param info
     * @return
     */
    @POST("finance-service/pos/myBill/getDetail")
    Observable<BaseResponse<Bill>> getDetail(@Body List<String> info);

    /**
     * 支付参数组装
     * @param info
     * @return
     */
    @POST("finance-service/pos/myBill/initiatePosPayment")
    Observable<BaseResponse<PayData>> initiatePosPayment(@Body Map<String, Object> info);


    /**
     * 获取账单记录列表
     * @param info
     * @return
     */
    @POST("finance-service/pos/myBill/getPageGetinList")
    Observable<BaseResponse<Records>> getPageGetinList(@Body Map<String, Object> info);

    /**
     * 账单记录详情
     * @param info
     * @return
     */
    @GET("finance-service/pos/myBill/getGetinDetail")
    Observable<BaseResponse<Record>> getGetinDetail(@QueryMap Map<String, Object> info);


    /**
     * 获取所有项目
     * @return
     */
    @GET("project-service/app/project/getProjectAppSelectList")
    Observable<BaseResponse<List<Project>>> getProjectAppSelectList(@QueryMap Map<String, Object> info);


    /**
     * 取消POS收款校验
     * @return
     */
    @POST("finance-service/getin/validateCancelPosPaid")
    Observable<BaseResponse<Object>> validateCancelPosPaid(@Body Map<String, Object> info);

    /**
     * 取消POS收款
     * @return
     */
    @POST("finance-service/getin/cancelPosPaid")
    Observable<BaseResponse<Object>> cancelPosPaid(@Body Map<String, Object> info);


    @GET("project-service/app/project/getProjectsByPosId")
    Observable<BaseResponse<List<Project>>>queryProject(@QueryMap Map<String, Object> info);


    @GET("finance-service/pos/myBill/queryUnCallBackPayRecord")
    Observable<BaseResponse<List<UncheckBill>>> getUncheckBill(@QueryMap Map<String, Object> info);
    //批量收款界面
    @POST("finance-service/pos/myBill/batchPageBillList")
    Observable<BaseResponse<MultiBills>>getMultiPayList(@Body Map<String, Object> info);

}
